# -*- coding: utf-8 -*-
"""\
Example for cSAXS data preparation script, new flavor.

TODO:
 - Should all x/y be switched to be consistent with python's axis order?
"""

import ptycho2 as ptycho

# Empty parameter structure
p = ptycho.Param()

p.verbose_level = 3
p.interactive = False                         # Not used for now
p.base_path = '/data4/e17/CDI/cSAXS_sxdm_2012_06_nanogold'
p.user = 'e14129'
p.scan_number = 300  # or e.g. range(456,459)
#p.dpsize = (128,128)                          # Crop size (used to be "asize")
p.dpsize = (256,256)                          # Crop size (used to be "asize")
p.ctr = 'inter'                               # Center of cropped array
p.motors = ('opos0', 'opos1')                 # Motor names in x an y
p.motors_multiplier = 1e-6                    # Multiplier to convert motor values to meters
p.energy = 6.2                                # Energy in keV
p.detector_pixel_size = 172e-6                # Detector pixel size
p.detector_distance = 7.19                    # Detector distance
p.scan_type = None                            # None (use spec), or 'raster', 'round', 'round_ROI'
#p.scan_params.dr = 1e-6
#p.scan_params.lx = 10e-6
#p.scan_patems ...

dataScan = ptycho.cSAXS.prepare_data(p)
